// function alphabetPosition(str) {
//   let arr = str.split('')
//   let zimu = ['a','b', 'c','d', 'e','f','g','h','i','j',
//   'k','l','m','n','o','p','q','r','s','t','u','v','w','s','y','z',]
//   let string = ''
//   arr.map((m) => {
//     // eslint-disable-next-line array-callback-return
//     return zimu.map((v, i) => {
//       if (m.toLowerCase() === v) {
//         console.log(m)
//         let shu = i + 1 + ' '
//         string = string + shu
//       }
//     })
//   })
//   console.log(string)
//   return string
// }
// alphabetPosition('ewqeq')
// eslint-disable-next-line no-unused-vars
  import React from 'react'
  import ReactDOM from 'react-dom'
  import './index.css'
  // eslint-disable-next-line no-unused-vars
  function Primary({type}){
   console.log(type)
   return(
  <div className={'alert alert-' +type} role='alert' >
   A simple primary alert-check it out!
  </div>
   )

  }

  function Dialog(){

 return(
   <div className='box'>
   <ChildCome text='x'  onChildClick={(e)=>{
   console.log(e)
   }}>
   </ChildCome>
   <span className='title'>
   这是一个模态
   </span>

   </div>
  )
  }
  function ChildCome({text,onChildClick}){
   return(<button onClick={(e)=>{
  onChildClick('关闭')
   }}>
  {text}
   </button>)
  };

  function App(){
   return (<div><Primary type='success' /></div>)
  };
 ReactDOM.render(
   <React.StrictMode>
   <App/>
   <Dialog/>
   
   </React.StrictMode>,
   document.getElementById('root')
  )